<?php
/**
 * <https://y.st./>
 * Copyright © 2019 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Organising inventories',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<img src="/img/CC_BY-SA_4.0/y.st./weblog/2019/08/01.jpg" alt="Blocked path side" class="framed-centred-image" width="800" height="480"/>
<section id="diet">
	<h2>Dietary intake</h2>
	<p>
		For breakfast, I had 75 grams of cereal and 100 grams of soy milk.
		For lunch, I had the remaining 500 grams of that potato, onion, and Italian sausage stuff from yesterday.
		I planned to have something similar for dinner, but without the sausage.
		I baked it as before, but ended up stashing it in my refrigerator.
		That&apos;s fine though.
		The important thing is that I cooked the last of my potatoes.
		I&apos;m not going to forget about them and have them go bad on me now.
		I just need to eat this dish in the next couple of days.
		Instead, I just had a peanut butter and jelly sandwich.
	</p>
	<p>
		I feel like 500 grams is a lot, but this isn&apos;t really all that filling for some reason.
		I would think that starchy potatoes would keep me satisfied, but I guess they don&apos;t.
		Also, I did bike twenty-six kilometres - probably more, because the bike path was closed this week too and I had to take a detour - so that should counterbalance some of the eating.
	</p>
</section>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<p>
			Our textbook uses some Bézier splines in examples, but never actually explains what a Bézier spline is.
			How confusing!
		</p>
		<p>
			Another source says that a Bézier spline is a type of spline curve in which &quot;each polynomial spline segment is expressed in terms of Bernstein polynomials of a fixed degree&quot; (Eisele, 2012).
			What does that even mean?
			First, let&apos;s look at spline curves.
			According to Clemson University, a spline curve is a curve that passes through (in the case of interpolating curves) or near (in the case of approximating curves) points specified by the user (Clemson University, n.d.).
			To put it simply, a spline curve isn&apos;t hard-coded, but is instead gets defined mathematically using points specified through user input.
			From this, we can tell that spline segments would be the line segments between the points defined by the user.
			If they are to be curved, they&apos;ll need to be represented by polynomial equations, not simple linear equations.
			Particle in Cell backs this up, explaining that splines are collections of segments, each of which can be defined by any sort of equation, such as a basic linear equation or a polynomial equation (Particle In Cell Consulting LLC, n.d.).
			That means that points specified by a user that line up don&apos;t have to be connected by a light curve to approximate a straight segment; an actually-straight segment may be used.
		</p>
		<p>
			Finally, we have to ask what a Bernstein polynomial is.
			This is where things get too complicated for me to understand.
			Bernstein polynomials of the <var>n</var>th degree are defined by this equation: B<sub><var>i</var>,<var>n</var></sub>(<var>t</var>) = (<sup><var>n</var></sup><sub><var>i</var></sub>)<var>t</var><sup>i</sup>(1 - <var>t</var>)<sup><var>n</var> - <var>i</var></sup>.
			<var>i</var> is equal to all integers from zero to <var>n</var> in which this equation holds true: (<sup><var>n</var></sup><sub><var>i</var></sub>) = <var>n</var>! / (<var>i</var>!(<var>n</var> - <var>i</var>)!) (University of California, n.d.).
			Oh, my.
			I can&apos;t even <strong>*begin*</strong> to solve for these equations, as I&apos;m not familiar with the syntax used.
			We&apos;ve got exponents, we&apos;ve got division and subtraction, we&apos;ve got factorials, and we&apos;ve got implicit multiplication.
			I can handle all that.
			But what are these variables on top of other variables without a division bar, wrapped in parentheses?
			I have no idea.
			I&apos;m pretty sure we&apos;ve never covered that in any maths course I&apos;ve ever taken.
			It seems that without some advanced mathematical knowledge, we can&apos;t even define a Bézier spline, let alone understand what one actually is.
		</p>
		<p>
			From what we <strong>*were*</strong> able to break down though, it seems Bézier splines are used in some way to approximate curves using points that are not hard-coded, but instead specified by the user.
		</p>
		<p>
			We are asked to explain how to implement a Bézier spline.
			Given that I don&apos;t have the mathematical knowledge to even understand what they are, I certainly have no idea how to implement one!
			As for an example of a program that implements them, I found a JavaScript program that does just that: <a href="https://www.particleincell.com/wp-content/uploads/2012/06/bezier-spline.js"><code>https://www.particleincell.com/wp-content/uploads/2012/06/bezier-spline.js</code></a>.
			However, again, without that basic mathematical understanding of what a Bézier spline is, I can&apos;t for the life of me decipher what this program actually does.
		</p>
		<div class="APA_references">
			<h3>References:</h3>
			<p>
				Clemson University. (n.d.). Chapter 14: Spline Curves. Retrieved from https://people.cs.clemson.edu/~dhouse/courses/405/notes/splines.pdf
			</p>
			<p>
				Eisele, E. F. (2012, March 26). Bézier spline - Encyclopedia of Mathematics. Retrieved from https://www.encyclopediaofmath.org/index.php/B%C3%A9zier_spline
			</p>
			<p>
				Particle In Cell Consulting LLC. (n.d.). Smooth Bézier Spline Through Prescribed Points. Retrieved from https://www.particleincell.com/2012/bezier-splines/
			</p>
			<p>
				University of California. (n.d.). On-Line Geometric Modeling Notes. Retrieved from http://graphics.cs.ucdavis.edu/education/CAGDNotes/Bernstein-Polynomials/Bernstein-Polynomials.html
			</p>
		</div>
	</blockquote>
</section>
<section id="Minetest">
	<h2>Minetest</h2>
	<img src="/img/CC_BY-SA_3.0/minetest.net./weblog/2019/08/01.png" alt="A new basement with chests set in the walls" class="framed-centred-image" width="1024" height="600"/>
	<p>
		I started work again on the bridge.
		According to my calculations, I didn&apos;t have enough mese to reach World&apos;s Navel, but I had enough to get close.
		The plan was to build to within a stone&apos;s throw of the island, then head back into the mine.
		Oddly enough though, I found I had a tonne of extra rails once I got there.
		I&apos;ve got enough mese after all!
		I&apos;m not sure where I went wrong in my calculation, but I&apos;ll be able to get to World&apos;s Navel and set up the crossroads inside its mountain.
		Before I lay that many rails though, I want to finish building the bridge that holds the rails I&apos;ve already placed.
		Right now, the limiting factor isn&apos;t a lack of mese, but a lack of wood.
		I mean, I won&apos;t be able to get much further than World&apos;s Navel on this amount of mese, but I can&apos;t even get <strong>*to*</strong> World&apos;s Navel without quite a few more pine logs.
	</p>
	<p>
		I did a lot of tree farming today, and ended up with several more piles of pine needles.
		All the needles make my storage disorganised, so now I&apos;ve dug out a second basement, just under the ground floor of the cabin, but far above the previous basement with the mushroom garden.
		That now leaves me with four storage areas, excluding the temporary one at Somniphobia.
		In the attic, I&apos;m storing full stacks of nodes that need to be sifted and are good as scaffolding, such as pine needles and gravel.
		On the ground floor, I&apos;m storing incomplete stacks.
		In the upper basement, I&apos;m storing full stacks of things I might one day use, which includes things I&apos;ll likely use, such as silver sandstone and snow, as well as things I&apos;m unlikely to need, such as saplings.
		I gather saplings far faster than I plant them, so I don&apos;t really need the full stacks, and just use my partial stack.
		And finally, in the mushroom garden, I&apos;m storing utter garbage I&apos;ll never have a use for unless changes are made to the game.
		This would be my harvested mushrooms (unused because they look too much like unharvested mushrooms and might confuse me) and flint (unused because I&apos;m not a pyromaniac, and flint in this game is good only for starting fires).
		At some point, if I remain here long enough, I&apos;ll likely compress my cobble into furnaces, which I&apos;ll absolutely never have a need for the several stacks of that I&apos;ll have.
		For now, I&apos;ve just got cobble stashed with the useful stacks, as I sometimes smelt it and make it into stone blocks or stone bricks, and I sometimes take an extra stack with me to build tools out of.
	</p>
</section>
END
);
